<?php
namespace app\controllers;


use app\common\corelib\LocalUpload;
use app\logic\OrderLogic;
use yii;
//订单管理
class OrderController extends BackendController
{
    //购买的课程
    public function actionIndex()
    {
        $query = Yii::$app->request->get('form', []);
        $page = Yii::$app->request->get('page', 1);
        $orderLogic = new OrderLogic();
        $this->data['breadcrumbs'] = '课程购买';
        return $this->render('index', [
            'order' => $orderLogic->getOrder(1,$query, $page),
            'query' => $query
        ]);
    }
    //打赏统计
    public function actionTips()
    {
        $query = Yii::$app->request->get('form', []);
        $page = Yii::$app->request->get('page', 1);
        $orderLogic = new OrderLogic();
        $this->data['breadcrumbs'] = '打赏统计';
        return $this->render('tips', [
            'order' => $orderLogic->getOrder(0,$query, $page),
            'query' => $query
        ]);
    }




}